﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NET.Generic
{
    [TestClass]
    public class Main
    {
        [TestMethod]
        public void GenericClassTest()
        {
            var obj1 = new GenericClass<int>(100);
            var obj2 = new GenericClass<string>("123");

            Console.WriteLine($"obj1:{obj1.GetTypeName()}");
            Console.WriteLine($"obj2:{obj2.GetTypeName()}");
        }

        [TestMethod]
        public void GenericMethodTest()
        {
            var list1 =  GenericMethod.BuildList(1, 2, 3, 4);
            var list2 =  GenericMethod.BuildList("a","b","c","d");

            Console.WriteLine($"list1:{JsonConvert.SerializeObject(list1)}");
            Console.WriteLine($"list2:{JsonConvert.SerializeObject(list2)}");
        }


    }
}
